package modele;

import java.util.LinkedList;


import android.app.Application;
import android.widget.Toast;

public class CoreData extends Application{
	
	LinkedList<Chat> allChat = new LinkedList<Chat>();
	int id;
	String user;
	

	public LinkedList<Chat> getAllChat() {
		return allChat;
	}

	public void setAllChat(LinkedList<Chat> allChat) {
		this.allChat = allChat;
	}
	
	public Chat getchatnumberi(String i) 
	{
		for ( Chat c : allChat)
		{
			
			if ( c.id.equals(i) )
			{
				
				return c;
			}
		}
		Toast.makeText(getApplicationContext(), "null", Toast.LENGTH_SHORT).show();

		return null;

	}
	
	public void ajouterchat(Chat chat)
	{
		allChat.add(chat);
	}
	
	
	
	
	
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

}
